<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h1>Hello Euro 2012</h1>
        
        <f:view>
            <h:form>
                <h1>Message:</h1>
                Password:
                <br/><h:inputSecret value="#{pushMessage.password}" />
                <br/>Message:
                <br/>
                <h:inputTextarea value="#{pushMessage.message}" />
                <br />
                <h:commandButton action="#{pushMessage.push}" value="Push All" />
                <h1><h:outputText value="List"/></h1>
                <h:dataTable value="#{clientManagedBean.list}" var="item">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="ClientId"/>
                        </f:facet>
                        <h:outputText value="#{item.clientId}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="RegistrationId"/>
                        </f:facet>
                        <h:outputText value="#{item.registrationId}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Action"/>
                        </f:facet>
                        <h:commandButton action="#{pushMessage.pushClient}" value="Push">
                            <f:setPropertyActionListener value="#{item.registrationId}" target="#{pushMessage.currentKey}" />
                        </h:commandButton>
                    </h:column>
                </h:dataTable>
            </h:form>
        </f:view>

</h:body>

</html>

